<?php

namespace App\Library\Common;

class MemoryUsageTools
{
    /**
     * @param int $size
     * @return string
     */
    public static function transToMb(int $size): string
    {
        return round($size / 1024 / 1024, 2) . "m";
    }

    /**
     * @return string
     */
    public static function getNowMemoryUsage(): string
    {
        return self::transToMb(memory_get_usage());
    }
}
